package com.maserb.monitor.repository;

import com.maserb.monitor.entity.SysCode;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysCodeRepository extends JpaSpecificationExecutor<SysCode>
        , PagingAndSortingRepository<SysCode, String> {

    List<SysCode> findByParent(SysCode sysCode);

    SysCode findByCode(String code);

    SysCode findByName(String name);

    SysCode findFirstByCodeSortAndName(String codeSort, String name);
}